﻿using System;
using System.Security.Principal;

namespace IrelandAlt.ORNetTwitt.Resources
{
    public class UserUiResource : IUserSecurity
    {
        private readonly IIdentity _identity;

        public UserUiResource(IIdentity identity)
        {
            this._identity = identity;
        }

        public UserUiResource(IPrincipal principal)
        {
            this._identity = principal.Identity;
        }

        public UserUiResource()
        {
        }

        public bool IsInRole(string role)
        {
            throw new System.NotImplementedException();
        }

        public IIdentity Identity
        {
            get { return _identity; }
        }

        public decimal UserId { get; set; }
        
        public string FName { get; set; }
        
        public string LName { get; set; }
        
        public string UserName { get; set; }
        
        public string Password { get; set; }

        public string AuthenticationType { get; set; }
        
        public bool IsAuthenticated { get; private set; }

        public bool IsLocalHost { get; set; }

        public void MakeUserAuthenticated()
        {
            IsAuthenticated = true;
        }
    }
}
